package com.smartcommunity.elasticsearch.accesscontrol.req;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import java.io.Serializable;

/**
 * @author lilun
 */
@ApiModel(description = "门禁请求模型")
@Data
public class AccesscontrolEsReq implements Serializable {

    private static final long serialVersionUID = 1288449591853419190L;

    @ApiModelProperty(notes = "小区villageCode", example="3232121211")
    private String villageCode;

    @NotBlank(message = "设备id不能为空！")
    @ApiModelProperty(notes = "设备id", example="1")
    private String deviceId;

    @ApiModelProperty(notes = "页码", example="1")
    private Integer pageNum = 1;

    @ApiModelProperty(notes = "每页显示多少数据", example="15")
    private Integer pageSize = 15;

    @ApiModelProperty(notes = "回显字段(逗号分隔)", example="cameraId,cameraName")
    private String fields = "credentialNo,cardNo";

    @ApiModelProperty(notes = "排序字段", example="openTime")
    private String sortField = "openTime";

    @ApiModelProperty(notes = "排序模式 desc:倒序 asc:正序", example="desc")
    private String sortMode ="desc";
}
